package com.kingbook.entity;

import com.kingbook.common.utils.StringUtils;

@lombok.Data
public class SmsTemplate {

    String accessKeyId;

    String accessKeySecret;

    String regionId;

    String domainUrl;

    boolean isRealSend;

    int timeout = 600;

    public void checkEmpty() {
        if (StringUtils.isEmpty(accessKeyId))
            throw new NullPointerException("SMS参数配置为空 accessKeyId=null");
        if (StringUtils.isEmpty(accessKeySecret))
            throw new NullPointerException("SMS参数配置为空 accessKeySecret=null");
        if (StringUtils.isEmpty(regionId))
            throw new NullPointerException("SMS参数配置为空 regionId=null");
        if (StringUtils.isEmpty(domainUrl))
            throw new NullPointerException("SMS参数配置为空 domainUrl=null");
    }
}
